<table class="box-vang5" cellpadding="0" cellspacing="0" width="100%">
        <tbody><tr class="light">
          <td class="text-top">.:. Dự án quá hạn</td>
        </tr>
      </tbody></table>
      <table class="box-vang5" cellpadding="0" cellspacing="0" width="100%">
        <tbody><tr class="light">
          <td class="t-l"></td>
          <td class="t-c"></td>
          <td class="t-r"></td>
        </tr>
        <tr class="light">
          <td class="c-l"></td>
          <td class="c-c" valign="top">

<div class="clear" style="height:10px"></div>
		<table id="box-quick" class="box-quick" border="0" cellpadding="5" cellspacing="0" width="100%">
          <tbody><tr id="title">
            <td width="5%">Mã </td>
            <td width="30%">Tên dự án</td>        
            <td width="10%">Mức độ ưu tiên</td>
            <td width="10%">Ngày bắt đầu</td>
             <td width="10%">Ngày kết thúc</td>
             <td width="10%">Giao cho</td>
              <td width="10%">Tình trạng</td>
          </tr>
          <?php 
		  	$user=$_SESSION['userid'];
			$ngayhientai=date('d',time());
		  	$sql=mysql_query("select * 
								from 
									register
									inner join tb_task on register.task_id=tb_task.task_id
								where register.recipient='$user' and register.ngaycuoicung < $ngayhientai and tb_task.status=1 and register.giahan=0 and tb_task.quahan=0");
			while($row=mysql_fetch_array($sql))
			{
		  ?>
          <tr class="light" id="value">
            <td style="border-left:1px solid #ccc"><div align="center"><?php echo $row['task_id'];?></div></td>
          
            <td><div align="left">&nbsp;<span>
				<a href="index.php?tn=task_detail&id=<?php echo $row['task_id'];?>"><?php echo $row['task_name'];?></a>
                 </span>
                </div>
            </td>
           
            <td><div align="center" style="color:#090;">
            		<?php if($row['level']==1){echo 'Thấp';}?>
                    <?php if($row['level']==2){echo 'Trung bình';}?>
                    <?php if($row['level']==3){echo 'Cao';}?>
            	</div>
            </td>
            <td><div align="center"><?php echo date('d-m-Y',$row['contract_start']);?> </div></td>
             <td><div align="center"><?php echo date('d-m-Y',$row['contract_end']);?></div></td>
             <td align="center"><?php echo $row['recipient_name'];?> </td>
             <td><div align="center">&nbsp;<a href="index.php?tn=xingiahan&id=<?php echo $row['task_id'];?>"><img src="images/giahan.jpg" /></a></div></td>
          </tr>
          <?php }?>
          
        </tbody></table>
        
        
        <div class="clear" style="height:10px"></div>
        <?php if($_SESSION['level']==2 or $_SESSION['level']==3){?>
        <table id="box-quick" class="box-quick" border="0" cellpadding="5" cellspacing="0" width="100%">
          <tbody>
          <tr><td colspan="10"><strong>Dành cho trưởng phòng duyệt</strong></td></tr>
          <tr id="title">
            <td width="5%">Mã </td>
         
            <td width="30%">Tên dự án</td>
          
            <td width="10%">Mức độ ưu tiên</td>
            <td width="10%">Ngày đăng ký</td>
            <td width="10%">Ngày bàn giao</td>
            <td width="10%">Người yêu cầu </td>
            <td width="10%">Tình trạng</td>
          </tr>
           <?php 
		  	$sql2=mysql_query("select * 
								from 
									register
									inner join tb_task on register.task_id=tb_task.task_id
									inner join tb_account_admin on register.recipient=tb_account_admin.account_id 
								where giahan=1");
			while($row2=mysql_fetch_array($sql2))
			{
		  ?>
          <tr class="light" id="value">
            <td style="border-left:1px solid #ccc"><div align="center"><?php echo $row2['task_id'];?></div></td>
          
            <td><div align="left">&nbsp;<span>
				<a href="index.php?tn=task_detail&id=<?php echo $row2['task_id'];?>"><?php echo $row2['task_name'];?></a>
                 </span>
                </div>
            </td>
            <td>
            	<div align="center" style="color:#090;">
                	<?php if($row2['level']==1){echo 'Thấp';}?>
                    <?php if($row2['level']==2){echo 'Trung bình';}?>
                    <?php if($row2['level']==3){echo 'Cao';}?>
                </div>
            </td>
              <td><div align="center"><?php echo date('d-m-Y',$row2['contract_start']);?> </div></td>
             <td><div align="center"><?php echo date('d-m-Y',$row2['contract_end']);?></div></td>
             <td align="center"><?php echo $row2['account_name'];?>  </td>
             <td onclick="window.open('index.php?tn=chapnhan&id=<?php echo $row2['id'];?>','_blank');"><div align="center">&nbsp;<img src="images/dongy.jpg" /></div></td>
          </tr>
      <?php }?>
        </tbody></table>
 <?php }?>
 <td class="c-r"></td>
        </tr>
        <tr class="light">
          <td class="b-l"></td>
          <td class="b-c"></td>
          <td class="b-r"></td>
        </tr>
      </tbody></table>